#include <stdio.h>
#include <unistd.h>
#include <string.h>
#define M 101
int main()
{
    int count = 0;
    char str[M] = "0";
    const char* lable = "-/|\\";
    memset(str, 0 , 101);
    while (count < 100)
    {
        printf("[%-100s][%d%%][%c]\r", str, count, lable[count%4]);
        str[count++] = '=';
        str[count] = '>';
        fflush(stdout);   
        
        usleep(30000);
    }
    printf("\n");  
    return 0;

}
